package com.example.blog.controller;

import com.example.blog.dto.QueryUserReqDto;
import com.example.blog.dto.QueryUserResDto;
import com.example.blog.dto.base.LoginReqDto;
import com.example.blog.dto.base.LoginResponseDto;
import com.example.blog.response.PageableResponseModelDto;
import com.example.blog.response.ResponseModelDto;
import com.example.blog.response.ResponseModels;
import com.example.blog.service.LiveUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Admin
 */
@RestController
@Api(value = "登录接口", tags = "登录接口")
@RequestMapping("/")
public class LiveLoginController {

    @Resource
    private LiveUserService userService;

    @GetMapping("login")
    @ApiOperation("登录")
    public ResponseModelDto<LoginResponseDto> userLogin(@Validated LoginReqDto reqDto){
        return userService.login(reqDto);
    }

}
